package com.kly.enums;

/**
 * 应用内商品的消耗状态。可能的值包括：0。尚未消耗 1. 已使用
 * @author linqu
 */
public enum GooglePayConsumerStatus {
    UN_USED(0, "PURCHASES UN_USED"),

    USED(1, "USED"),

    ;
    private Integer status;
    private String description;

    GooglePayConsumerStatus(Integer status, String description) {
        this.status = status;
        this.description = description;
    }

    public static GooglePayConsumerStatus fromType(Integer status) {

        for (GooglePayConsumerStatus orderStatus : values()) {
            if (orderStatus.getStatus().equals(status)) {
                return orderStatus;
            }
        }
        return null;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
